<bit-dialog dialogSize="default">
  <ng-container bitDialogTitle>
    <span>{{ "newAccessToken" | i18n }}</span>
    <span class="tw-text-sm tw-normal-case tw-text-muted">
      {{ data.subTitle }}
    </span>
  </ng-container>

  <div bitDialogContent>
    <bit-callout type="info" [title]="'accessTokenCallOutTitle' | i18n">
      {{ "downloadAccessToken" | i18n }}<br />
      {{ "expiresOnAccessToken" | i18n }}
      {{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date: "medium") }}
    </bit-callout>

    <bit-form-field class="tw-mb-0">
      <bit-label>{{ "accessToken" | i18n }}</bit-label>
      <textarea bitInput disabled rows="4">{{ data.accessToken }}</textarea>
    </bit-form-field>
    {{ "expiresOnAccessToken" | i18n }}
    {{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date: "medium") }}
  </div>

  <ng-container bitDialogFooter>
    <button type="button" bitButton buttonType="primary" (click)="copyAccessToken()">
      <i class="bwi bwi-clone" aria-hidden="true"></i>
      {{ "copyToken" | i18n }}
    </button>
  </ng-container>
</bit-dialog>
